package br.ufrn.sipac.patrimonio.coletor.exception;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

@SuppressWarnings("serial")
public class NegocioException extends ColetorRuntimeException {

	public NegocioException(String message, Context context) {
		super(message);
		final AlertDialog.Builder builder = new AlertDialog.Builder(context);
		builder.setTitle("Operação Inválida");
		builder.setMessage(message);
		builder.setPositiveButton("OK", new OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
			}
		});
		builder.show();
		return;
	}

}
